import request from '@/utils/request'

// 查询设备类型列表
export function listDeviceTypesData(query) {
  return request({
    url: '/business/deviceType/list',
    method: 'get',
    params: query
  })
}

// 查询设备类型列表 - 树结构
export function listDeviceTypesDataTree() {
  return request({
    url: '/business/deviceType/treeList',
    method: 'post'
  })
}

// 查询设备类型详细
export function getDeviceTypesData(deviceId) {
  return request({
    url: '/business/deviceType/' + deviceId,
    method: 'get'
  })
}

// 新增设备类型
export function addDeviceTypesData(data) {
  return request({
    url: '/business/deviceType',
    method: 'post',
    data: data
  })
}

// 修改设备类型
export function updateDeviceTypesData(data) {
  return request({
    url: '/business/deviceType',
    method: 'put',
    data: data
  })
}

// 删除设备类型
export function delDeviceTypesData(deviceIds) {
  return request({
    url: '/business/deviceType',
    method: 'delete',
    data: deviceIds
  })
}
